package com.ruoyi.credit.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.credit.mapper.ContractIncomeCustomersMapper;
import com.ruoyi.credit.domain.ContractIncomeCustomers;
import com.ruoyi.credit.service.IContractIncomeCustomersService;
import com.ruoyi.common.core.text.Convert;

/**
 * 收入类合同合约方关系Service业务层处理
 * 
 * @author zhulei
 * @date 2022-03-10
 */
@Service
public class ContractIncomeCustomersServiceImpl implements IContractIncomeCustomersService 
{
    @Autowired
    private ContractIncomeCustomersMapper contractIncomeCustomersMapper;

    /**
     * 查询收入类合同合约方关系
     * 
     * @param id 收入类合同合约方关系主键
     * @return 收入类合同合约方关系
     */
    @Override
    public ContractIncomeCustomers selectContractIncomeCustomersById(Long id)
    {
        return contractIncomeCustomersMapper.selectContractIncomeCustomersById(id);
    }

    /**
     * 查询收入类合同合约方关系列表
     * 
     * @param contractIncomeCustomers 收入类合同合约方关系
     * @return 收入类合同合约方关系
     */
    @Override
    public List<ContractIncomeCustomers> selectContractIncomeCustomersList(ContractIncomeCustomers contractIncomeCustomers)
    {
        return contractIncomeCustomersMapper.selectContractIncomeCustomersList(contractIncomeCustomers);
    }

    /**
     * 新增收入类合同合约方关系
     * 
     * @param contractIncomeCustomers 收入类合同合约方关系
     * @return 结果
     */
    @Override
    public int insertContractIncomeCustomers(ContractIncomeCustomers contractIncomeCustomers)
    {
        return contractIncomeCustomersMapper.insertContractIncomeCustomers(contractIncomeCustomers);
    }

    /**
     * 修改收入类合同合约方关系
     * 
     * @param contractIncomeCustomers 收入类合同合约方关系
     * @return 结果
     */
    @Override
    public int updateContractIncomeCustomers(ContractIncomeCustomers contractIncomeCustomers)
    {
        return contractIncomeCustomersMapper.updateContractIncomeCustomers(contractIncomeCustomers);
    }

    /**
     * 批量删除收入类合同合约方关系
     * 
     * @param ids 需要删除的收入类合同合约方关系主键
     * @return 结果
     */
    @Override
    public int deleteContractIncomeCustomersByIds(String ids)
    {
        return contractIncomeCustomersMapper.deleteContractIncomeCustomersByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除收入类合同合约方关系信息
     * 
     * @param id 收入类合同合约方关系主键
     * @return 结果
     */
    @Override
    public int deleteContractIncomeCustomersById(Long id)
    {
        return contractIncomeCustomersMapper.deleteContractIncomeCustomersById(id);
    }
}
